package linker

import (
	"os"

	"gitee.com/jack-wang2120/rvld/pkg/utils"
)
type File struct{
	Name string
	Contents []byte
}
//MustNewFile把文件读取的代码抽象为一个函数
func MustNewFile(filename string)*File{
	contents,err := os.ReadFile(filename)
	utils.MustErr(err)
	return &File{
		Name:filename,
		Contents: contents,
	}
}